#include "threadpool.hpp"
using namespace Mythreadpool;


void push()
{
    int cnt = 5;
    while(cnt--)
    {
        std::cout << "我是一个数据库同步任务" << std::endl;
        sleep(1);
    }
}
    using func_t = std::function<void()>;

int main()
{
    threadpool<func_t>::GetInstance();
    int cnt = 5;

    while(cnt--)
    {
        threadpool<func_t>::GetInstance()->Equeue(push);
    }

    threadpool<func_t>::GetInstance()->Wait();
    return 0;
}



